package com.jiyun.controller;

import com.jiyun.pojo.Address;
import com.jiyun.service.AddressService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("address")
@CrossOrigin
public class AddressController {

    @Resource
    private AddressService addressService;

    @RequestMapping("list")
    public List<Address> list(){
        return addressService.list();
    }

}
